package com.qianli.cashmama.trade.dao.impl;

import com.fqgj.common.base.AbstractBaseMapper;
import com.qianli.cashmama.trade.dao.TUserLevelConfigRulesDao;
import com.qianli.cashmama.trade.entity.TUserLevelConfigRulesEntity;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;

/**
* User: sm
* Date: 2019-12-18
* Time: 14:47:02.646
*/

@Repository
public class TUserLevelConfigRulesDaoImpl extends AbstractBaseMapper<TUserLevelConfigRulesEntity> implements TUserLevelConfigRulesDao {

    @Override
    public TUserLevelConfigRulesEntity selectActiveOneByCategoryCodeAndLastBorrowCapital(String categoryCode, BigDecimal lastBorrowCapital) {
        Map<String, Object> map = new HashMap<>();
        map.put("categoryCode", categoryCode);
        map.put("lastBorrowCapital", lastBorrowCapital);
        return getSqlSession().selectOne(getStatement("selectActiveOneByCategoryCodeAndLastBorrowCapital"), map);
    }
}